<extend name="Member:base" />
<block name="title"><title>心心向善-订单详情</title></block>
		<!-- 头部结束-->
<block name="body">

			<!--<主要区块>-->
			<div class="right-layout">
				<div class="wrap">
					<div class="tabmenu">
						<ul class="tab pngFix">
							<li class="normal">
								<a href="/member/swjydd.html">订单列表</a>
							</li>
							<li class="active">
								<a href="#">订单详情</a>
							</li>
						</ul>
					</div>
					<!-- <div class="alert alert-success">
						<h4>操作提示：</h4>
						<ul>
							<li>1. 退款需先提交退款申请，经商家和平台审核通过后才能退款成功。</li>
						</ul>
					</div> -->
					<table class="ncm-default-table order">
							<thead>
								<tr>
									<th class="w10"></th>
									<th colspan="2">商品</th>
									<th class="w100">单价（元）</th>
									<th class="w40">数量</th>
									<!-- <th class="w100">售后</th> -->
									<th class="w120">订单金额（元）</th>
									<th class="w100">交易状态</th>
									<th class="w150">交易操作</th>
								</tr>
							</thead>
							<tbody order_id="">
							    <tr>
									<td colspan="19" class="sep-row"></td>
								</tr>
								<tr>
									<th colspan="19"> 
										<span class="ml10">
									          <!-- order_sn -->
									          订单号：{$list2.order_sn}       
										</span>
										<!-- order_time -->
										<span>下单时间：{$list2.add_time|date="Y-m-d H:i:s",###}</span>

										<!-- store_name -->
										<span>商铺名称：<a href="#" title="1111">{$list2.store_name}</a></span>
									</th>
								</tr>
								<?php foreach($list as $key => $value){?>
								<tr>
									<td class="bdl"></td>
									<td class="w70">
										<div class="ncm-goods-thumb">
											<a href="#" target="_blank">
											<img src="<?php echo $value['goods_image']?>" onmouseover="toolTip('<img src=<?php echo $value['goods_image']?>>')" onmouseout="toolTip()">
											</a>
										</div>
									</td>
									<td class="tl">
										<dl class="goods-name">
											<dt><a href="#" target="_blank"><font style="color:red;"><?php echo $value['color_n']?> <?php echo $value['spec_n']?></font> <?php echo $value['goods_name'];?> </a>
											
											</dt>
										</dl>
									</td>
									<td>
									<?php if($value['point_num']>0){
									
										echo $value['point_num'].'&nbsp;积分';
									} 
									if ($value['coin_num']>0) {
										if($value['point_num']>0){
									
											echo '+';
									    }
										echo $value['coin_num'].'&nbsp;币';
										
										if($value['goods_price']>0){
									
											echo '+';
									    }
									} 
									if ($value['goods_price']>0) {
									if($value['point_num']>0 && !$value['coin_num']){
									
											echo '+';
									    }
										echo '￥'.$value['goods_price'];
									} ?>
									
									</td>
									<td><?php echo $value['goods_num']?></td>
									<!-- <td>
										<p>
										<?php if($value['status']!='-1' && $value['status']!=4 && $value['status']!=6){?>
										<a href="/member/tk.html?id=<?php echo $value['id']?>">退款</a>
										<?php }else{?>
										退款
										<?php }?>
										</p>
										<p>
											<a href="/member/th.html?id=<?php echo $value['id']?>">换货</a>
										</p>
									</td> -->
									<td class="bdl" rowspan="1">
										<p class=""><strong>
									<?php if($value['point_num']>0){
									
										echo  ($value['goods_num']*$value['point_num']).'&nbsp;积分';
									} 
									if ($value['coin_num']>0) {
										if($value['point_num']>0){
									
											echo '+';
									    }
										echo ( $value['goods_num']*$value['coin_num']).'&nbsp;币';
										
										if($value['goods_price']>0){
									
											echo '+';
									    }
									} 
									if ($value['goods_price']>0) {
									if($value['point_num']>0 && !$value['coin_num']){
									
											echo '+';
									    }
										echo '￥'.( $value['goods_num']*$value['goods_price']);
									} ?>										
										</strong></p>
										<p class="goods-freight">
										</p>
										<p title="支付方式：微信支付">{$v.payment_code}</p>
									</td>
									<td class="bdl bdr" rowspan="1">
										<p>
										<?php if($list2['order_state']=='10'){?>
										<?php echo '待付款'?>
										<?php }else if($list2['order_state']==20){?>
										<?php echo '待发货'?>
										<?php }else if($list2['order_state']==30){?>
										<?php echo '待收货'?>
										<?php }else if($value['status']==3){?>
										<?php echo '待评价'?>
										<?php }else if($value['status']==4){?>
										<?php echo '待退款'?>
										<?php }else if($value['status']==5){?>
										<?php echo '已完成'?>
										<?php }else if($value['status']==6){?>
										<?php echo '已退款'?>
										<?php }?>
										</p>
										<!-- <p>
											<a href="/member/ddxq.html?id={$v.id}&qb=qb" target="_blank">订单详情</a>
										</p> -->
									</td>
									<td class="bdl bdr" rowspan="1">
										<p>
											<!-- <a class="ncm-btn ncm-btn-acidblue" href="/member/wypj.html?id=<?php echo $value['rec_id']?>">我要评价</a> -->
										<?php if($value['pj_content']==''){?>
										<a class="ncm-btn ncm-btn-acidblue" href="/member/wypj.html?id=<?php echo $value['rec_id']?>">我要评价</a>
										<?php }else{?>
                                        <?php echo '已评价过'?>
										<?php }?>
										</p>
									</td>
								</tr>
								<?php }?>
							</tbody>
					</table>
					<form id="form_avaster" action="ddxq" method="post" >
					<input type="hidden" name="form_submit" value="ok">
					<input type="hidden" name="id" value="{$tkid}">
					<input type="hidden" name="qb" value="{$qb}">
					<div class="ncm-default-form">
							<if condition="$list2.order_amount gt 0">
							<dl>
								<dt><i class="required"></i>合计支付金额：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value="{$list2.order_amount}" name="order_amount" id="order_amount" readonly>
								</dd>
							</dl>
							</if>
							<if condition="$list2.points_amount gt 0">
							<dl>
								<dt><i class="required"></i>合计支付积分：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value="{$list2.points_amount}&nbsp;积分" name="points_amount" id="points_amount" readonly>
								</dd>
							</dl>
							</if>
							<if condition="$list2.gold_amount gt 0">
							<dl>
								<dt><i class="required"></i>合计支付增值币：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value="{$list2.gold_amount}&nbsp;币" name="gold_amount" id="gold_amount" readonly>
								</dd>
							</dl>
							</if>
							<dl>
								<dt><i class="required"></i>运费：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value="{$list2.shipping_fee}" name="shipping_fee" id="shipping_fee" readonly>
								</dd>
							</dl>
							<dl>
								<dt><i class="required"></i>支付方式：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value="{$list2.pay_name}" name="pay_name" id="pay_name" readonly>
								</dd>
							</dl>
							<if condition="$list2.payment_time neq ''" >
							<dl>
								<dt><i class="required"></i>付款编号：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value="{$list2.pay_sn}" name="pay_sn" id="pay_sn" readonly>
								</dd>
							</dl>
							<dl>
								<dt><i class="required"></i>付款时间：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.payment_time|date="Y-m-d H:i:s",###}' name="payment_time" id="payment_time" readonly>
								</dd>
							</dl>
							</if>
							<if condition="$list2.fh_time neq ''" >
							<dl>
								<dt><i class="required"></i>发货时间：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.fh_time|date="Y-m-d H:i:s",###}' name="fhtime" id="fh_time" readonly>
								</dd>
							</dl>
							<dl>
								<dt><i class="required"></i>发货快递：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.kdgs}' name="kdgs" id="kdgs" readonly>
								</dd>
							</dl>
							<dl>
								<dt><i class="required"></i>快递单号：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.shipping_code}' name="shipping_code" id="shipping_code" readonly>
								</dd>
							</dl>
							</if>
							<if condition="$list2.finnshed_time neq ''" >
							<dl>
								<dt><i class="required"></i>收货时间：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.finnshed_time|date="Y-m-d H:i:s",###}' name="finnshed_time" id="finnshed_time" readonly>
								</dd>
							</dl>
							</if>
							<dl>
								<dt><i class="required"></i>收货人：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.realname}' name="realname" id="realname" readonly>
								</dd>
							</dl>
							<dl>
								<dt><i class="required"></i>收货地区：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.province}-{$list2.city}-{$list2.area}' name="shh_dq" id="shh_dq" readonly>
								</dd>
							</dl>
							<dl>
								<dt><i class="required"></i>收货详细地址：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.address}' name="address" id="address" readonly>
								</dd>
							</dl>
							<dl>
								<dt><i class="required"></i>收货电话号码：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.tel_phone}' name="tel_phone" id="tel_phone" readonly>
								</dd>
							</dl>
							<dl>
								<dt><i class="required"></i>收货手机号码：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="40" value='{$list2.mob_phone}' name="mob_phone" id="mob_phone" readonly>
								</dd>
							</dl>

							<dl>
								<dt><i class="required"></i>我的留言：</dt>
								<dd>
									<input type="text" class="text w180" maxlength="200" value="{$list2.order_message}" name="order_message" id="order_message" readonly>
								</dd>
							</dl>                       
							<if condition="$list2.status eq 2" >
							<dl class="bottom">
								<dt>&nbsp;</dt>
								<dd>
								<!-- <label class="submit-border">
						  <input type="hidden" name="tkhash" id="tkhash" value="">
				          <input type="submit" class="submit" value="提交"></label> -->
				          <a href="/member/qrsh.html?id={$list2.id}" class="ncm-btn">确认收货</a>
								</dd>
							</dl>
							</if>
						
					</div>
				    </form>
				</div>
			</div>
			<!--</主要区块>-->
			<div class="clear"></div>
		</div>
	<script type="text/javascript">
	$(function(){

		$('#face').change(function(){
					
			$("#tkhash").val(_getRandomString(32));
					
		});

		$('input').change(function(){
			$("#tkhash").val(_getRandomString(32));

		});
		$('textarea').change(function(){
			$("#tkhash").val(_getRandomString(32));
		});
	});
	

	// 获取长度为len的随机字符串  
	function _getRandomString(len) {  
		len = len || 32;  
		var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; // 默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1  
		var maxPos = $chars.length;  
		var pwd = '';  
		for (i = 0; i < len; i++) {  
			pwd += $chars.charAt(Math.floor(Math.random() * maxPos));  
		}  
		return pwd;  
	} 
  </script>
	</block>